package cn.dinghu.pro.mapper;

import cn.dinghu.pro.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sun.deploy.ui.AppInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author xibao
 * @since 2025-10-15
 */
public interface OrdersMapper extends BaseMapper<Orders> {
    @Update("update orders set order_status = #{status} where order_id = #{id}")
    int updateStatus(@Param("status") int status,@Param("id") int id);

    int update(Orders orders);

    int add(Orders orders);

    // 查询列表
    List<Orders> getAppInfoList(@Param("userId") Integer userId,@Param("nurseName") String nurseName,@Param("userName") String userName,@Param("orderStatus") String orderStatus,@Param("category") String category,@Param("phone") String phone,@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);
    // 获取总条数
    int getAppInfoCount(@Param("userId") Integer userId,@Param("nurseName") String nurseName,@Param("userName") String userName,@Param("orderStatus") String orderStatus,@Param("category") String category,@Param("phone") String phone);

    int updatePj(@Param("orderId") int orderId,@Param("pj") int pj);
}
